﻿using Core.Domain.Localization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Services.Localization
{
  /// <summary>
    /// 信息服务接口
    /// </summary>
    public partial interface ILocalizationService
    {
        /// <summary>
        /// 删除本地化字符串资源
        /// </summary>
        void DeleteLocaleStringResource(LocaleStringResource localeStringResource);

        /// <summary>
        /// 根据Id获取本地化字符串资源
        /// </summary>
        LocaleStringResource GetLocaleStringResourceById(int localeStringResourceId);

        /// <summary>
        /// 根据资源名称获取本地化字符串资源
        /// </summary>
        LocaleStringResource GetLocaleStringResourceByName(string resourceName);


        /// <summary>
        /// 获取所有本地化字符串资源
        /// </summary>
        IList<LocaleStringResource> GetAllResources();

        /// <summary>
        /// 增加本地化字符串资源
        /// </summary>
        void InsertLocaleStringResource(LocaleStringResource localeStringResource);

        /// <summary>
        /// 更新本地化字符串资源
        /// </summary>
        void UpdateLocaleStringResource(LocaleStringResource localeStringResource);

        /// <summary>
        /// 获取所有本地化资源值
        /// </summary>
        Dictionary<string, KeyValuePair<int, string>> GetAllResourceValues();

        /// <summary>
        /// 获取资源
        /// </summary>
        string GetResource(string resourceKey, 
            bool logIfNotFound = true, string defaultValue = "", bool returnEmptyIfNotFound = false);

    }
}
